<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
	</head>
	<body>
		<div id="app">
			<button v-on:click="count += 1">增加</button>
			{{count}}
			<button v-on:click="count -= 1">减少</button>
			
			<button v-on:click="greet">Greed</button>
		</div>
		
		<script>			
			var app = Vue.createApp({
				data(){
					return {
						message:"Hello World!",
						count: 0
					}
				},
				methods:{
					greet:function(){
						alert(this.message)
					}
				}
			}).mount("#app")
		</script>
	</body>
</html>
